import React from "react";
import { useNavigate } from "react-router-dom";
import { NavBar } from "antd-mobile";
type Props = {
  title: string;
};

export default function CustomNavBar({ title }: Props) {
  let navigate = useNavigate();
  const back = () => {
    navigate(-1);
  };
  return <NavBar onBack={back}>{title}</NavBar>;
}
